<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

               // 1-100的和
            let yi = 0
            for(let i = 1 ;i<101;i++){
                yi+=i
                console.log(yi);         
            }
        // 1到100中偶数的和
        let jia = 0 
            for(let i =1;i<=100;i++){
                console.log(i);
                 
                if (i%2===0) {
                    jia+=i
                }
            }
            console.log(jia);
            
    
        // 1到100中奇数的和
        let ji = 0 
            for(let i =1;i<=100;i++){               
                if (i%2===1) {
                    ji+=i
                }
            }
            console.log(ji);
        // 1到100中能被3整除的和
        let j = 0 
            for(let i =1;i<=100;i++){ 
                if (i%3===0) {
                    j+=i
                }
            }
            console.log(j);
        // 用户输入两值  打印这两个数之间的整数
        let shu = +prompt('第一个数')
        let shi = +prompt('第二个数')
        console.log(shu,shi);
        
        
    </script>
</body>
</html>